<?

	if ($e0 = (int)$cr['params']['node']) {
		if ($e = $cr['params']['component']) 
			return array( 
				array('id' => $cr['struct']['id'], 'tag' => $cr['struct']['tag'], 'name' => $cr['struct']['name'], 'path' => $p),
				array('id' => $cr['struct']['id'], 'tag' => $cr['struct']['tag'], 'name' => 'Компоненты', 'path' => $p."node-$e0/"),
				array('id' => $cr['struct']['id'], 'tag' => $cr['struct']['tag'], 'name' => 'Содержимое компонента', 'path' => $p."node-$e0/component-$e/"),
			);
		else 
		if ($e = $cr['params']['settings']) 
			return array( 
				array('id' => $cr['struct']['id'], 'tag' => $cr['struct']['tag'], 'name' => $cr['struct']['name'], 'path' => $p),
				array('id' => $cr['struct']['id'], 'tag' => $cr['struct']['tag'], 'name' => 'Компоненты', 'path' => $p."node-$e0/"),
				array('id' => $cr['struct']['id'], 'tag' => $cr['struct']['tag'], 'name' => 'Настройки компонента', 'path' => $p."node-$e0/settings-$e/"),
			);
		else 
			return array( 
				array('id' => $cr['struct']['id'], 'tag' => $cr['struct']['tag'], 'name' => $cr['struct']['name'], 'path' => $p),
				array('id' => $cr['struct']['id'], 'tag' => $cr['struct']['tag'], 'name' => 'Компоненты', 'path' => $p."node-$e0/"),
			);
	} 
	
	else

	if ($e = $cr['params']['gallery']) {
		$ex = array(array('id' => $cr['struct']['id'], 'tag' => $cr['struct']['tag'], 'name' => $cr['struct']['name'], 'path' => $p),
						array('id' => $cr['struct']['id'], 'tag' => $cr['struct']['tag'], 'name' => $cr['struct']['name'].': галерея', 'path' => $p."gallery-$e/"));

		if ($e1 = $cr['params']['albumedit'])
			$ex[] = array('id' => $cr['struct']['id'], 'tag' => $cr['struct']['tag'], 'name' => $cr['struct']['name'].': свойства альбома', 'path' => $p."gallery-$e/albumedit-$e1/");
		else
			
		if ($e1 = $cr['params']['album']) {
			$ex[] = array('id' => $cr['struct']['id'], 'tag' => $cr['struct']['tag'], 'name' => $cr['struct']['name'].': фото в альбоме', 'path' => $p."gallery-$e/album-$e1/");
			
			if ($e2 = $cr['params']['photo'])
				$ex[] = array('id' => $cr['struct']['id'], 'tag' => $cr['struct']['tag'], 'name' => $cr['struct']['name'].': свойства фотографии', 'path' => $p."gallery-$e/album-$e1/photo-$e2/");
		}
			
		
		return $ex; 
	}
	
	else 
	
	if ($e = $cr['params']['edit']) 
		return array( 
			array('id' => $cr['struct']['id'], 'tag' => $cr['struct']['tag'], 'name' => $cr['struct']['name'], 'path' => $p),
			array('id' => $cr['struct']['id'], 'tag' => $cr['struct']['tag'], 'name' => 'Редактирование', 'path' => $p."edit-$e/"),
		);
	else 
	if ($e = $cr['params']['view']) 
		return array( 
			array('id' => $cr['struct']['id'], 'tag' => $cr['struct']['tag'], 'name' => $cr['struct']['name'], 'path' => $p),
			array('id' => $cr['struct']['id'], 'tag' => $cr['struct']['tag'], 'name' => 'Просмотр', 'path' => $p."view-$e/"),
		);
	else 
	if ($e = $cr['params']['photo']) 
		return array( 
			array('id' => $cr['struct']['id'], 'tag' => $cr['struct']['tag'], 'name' => $cr['struct']['name'], 'path' => $p),
			array('id' => $cr['struct']['id'], 'tag' => $cr['struct']['tag'], 'name' => $cr['struct']['name'].': галерея', 'path' => $p."photo-$e/"),
		);
	else		
	if ($e = $cr['params']['photo2']) 
		return array( 
			array('id' => $cr['struct']['id'], 'tag' => $cr['struct']['tag'], 'name' => $cr['struct']['name'], 'path' => $p),
			array('id' => $cr['struct']['id'], 'tag' => $cr['struct']['tag'], 'name' => $cr['struct']['name'].': галерея2', 'path' => $p."photo2-$e/"),
		);
	else		
	if ($e = $cr['params']['id']) 
		return array( 
			array('id' => $cr['struct']['id'], 'tag' => $cr['struct']['tag'], 'name' => $cr['struct']['name'], 'path' => $p),
			array('id' => $cr['struct']['id'], 'tag' => $cr['struct']['tag'], 'name' => '', 'path' => $p."$e/"),
		);
	else 
	if ($e = $cr['params']['section']) 
		return array( 
			array('id' => $cr['struct']['id'], 'tag' => $cr['struct']['tag'], 'name' => $cr['struct']['name'], 'path' => $p),
			array('id' => $cr['struct']['id'], 'tag' => $cr['struct']['tag'], 'name' => $cr['struct']['name'].': редактирование раздела', 'path' => $p."section-$e/"),
		);
	else 
		return '';	

?>